#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @Time : 2025/7/23 22:23
# @Author : liuqi
# @File : conftest.py
# @Software: PyCharm
# @Describe:
import pytest
from playwright.sync_api import sync_playwright

@pytest.fixture(scope="function")
def page():
    with sync_playwright() as p:
        browser = p.chromium.launch(headless=True, slow_mo=500)
        context = browser.new_context()
        page = context.new_page()
        yield page
        context.close()
        browser.close()